import { BASIC_FLAG } from "$utils/enum";
import { getImg } from "$utils/imgs";
import { transitionParams } from "$utils/index";

export default {
  data() {
    return {
      basicFlag: BASIC_FLAG
    };
  },
  methods: {
    // 跳转新增页面
    pageSkip(item, flag) {
      const { v_sysValue, v_sysKey, v_id } = item
      const params = {
        useFlag: flag,
        key: v_sysKey,
        value: v_sysValue,
        id: v_id
      }
      uni.navigateTo({
        url: transitionParams(params, "/pages/set/add/index"),
      });
    },
    setImgUrl(item) {
      const url = getImg(item.selectBg)
      return url
    }

  }
};
